The present invention relates to a program, a recording medium, a control method, and an information processing apparatus. In particular, the present invention relates to a program, a recording medium, a control method, and an information processing apparatus, which relate to power saving of a central processing unit.
In recent years, a power saving technology for reducing power consumption of an information processing apparatus by disabling at least a part of functions of a central processing unit has attracted attention. For example, a certain central processing unit has a C0 state which is a normal execution mode, a C2 state in which an internal clock of the central processing unit is stopped, and a C3 state in which coherency control between a cache memory and a main memory is further disabled in the C2 state.
Moreover, in the information processing apparatus in recent years, an input/output device can perform bus master transfer which directly accesses the main memory without requesting processing to the central processing unit. Owing to the bus master transfer, the central processing unit does not receive interrupt processing more than necessary from the input/output device, and accordingly, operates efficiently.
However, in the case where the input/output device performs the bus master transfer when the central processing unit is in the C3 state, coherency of data between the cache memory and the main memory is lost. Hence, an operating system (hereinafter, referred to as an “OS”) of the central processing unit has shifted the central processing unit to the C3 state only when verifying that the bus master transfer is not being performed.
For example, an OS such as Windows XP (registered trademark) has reset a flag indicating that the bus master transfer is under processing, and if the flag remains in a reset state as a result of referring to the flag immediately thereafter, the OS has determined that frequency of the bus master transfer is low, and shifted the central processing unit to the C3 state. Then, when the bus master transfer is resumed, it has been necessary for the central processing unit to recover immediately from the C3 state to the C0 state and the like.
A prior art for performing power saving control has been proposed (refer to Patent Document 1).
[Patent Document 1] Japanese Patent Laid-Open No. Hei 8(1996)-6681
However, it takes some time for the central processing unit to recover to the C0 state and the like. For this reason, during a period from a request for an access to the main memory and the like to a time when the central processing unit recovers to the C0 state and resumes the processing, the input/output device has not been able to access the main memory and caused a failure in some cases.
For example, in order to communicate with another device at a constant speed, a communication device acquires data to be communicated from the main memory in advance and stores the data in a buffer memory. Then, when the data stored in the buffer memory becomes insufficient, the communication device requests an access to the main memory for the purpose of newly acquiring data from the main memory. When the data in the buffer memory is depleted during a period from this request to a time when the communication device acquires the data from the main memory, the communication device cannot constantly maintain the communication speed, and causes a failure.
In this connection, it is an object of the present invention to provide a program, a recording medium, a control method, and an information processing apparatus, which are capable of solving the above-described problem. This object is achieved by combinations of features described in independent claims in the scope of claims.